﻿using System;

using NUnit.Framework;

using octalforty.Syndication.Core;

namespace octalforty.Syndication.UnitTests.Core
{
    /// <summary>
    /// <see cref="SyndicationFeedItem"/> unit tests.
    /// </summary>
    [TestFixture()]
    public class SyndicationFeedItemTestFixture
    {
        [Test()]
        public void NoArgumentConstructor()
        {
            ISyndicationFeedItem syndicationFeedItem = new SyndicationFeedItem();

            Assert.IsNull(syndicationFeedItem.Author);
            Assert.IsEmpty(syndicationFeedItem.Copyright);
            Assert.IsEmpty(syndicationFeedItem.Description);
            Assert.IsEmpty(syndicationFeedItem.Link);
            Assert.IsTrue(DateTime.Now.Subtract(syndicationFeedItem.PublishedOn.Value).TotalSeconds < 1);
            Assert.IsEmpty(syndicationFeedItem.Title);
            Assert.IsEmpty(syndicationFeedItem.UniqueIdentifier);
            Assert.IsTrue(DateTime.Now.Subtract(syndicationFeedItem.UpdatedOn.Value).TotalSeconds < 1);
        }
    }
}
